package com.linewow.xhyy.nihaonew.entity.country;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by LXR on 2016/10/20.
 */
public class CountryInfo implements Parcelable {

    /**
     * abbreviation : China
     * countryName : 中国
     * index : #
     * number : 1
     */


    public String abbreviation;
    public String countryName;
    public String index;
    public int number;

    public void setIndex(String index) {
        this.index = index;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.abbreviation);
        dest.writeString(this.countryName);
        dest.writeString(this.index);
        dest.writeInt(this.number);
    }

    public CountryInfo() {
    }

    protected CountryInfo(Parcel in) {
        this.abbreviation = in.readString();
        this.countryName = in.readString();
        this.index = in.readString();
        this.number = in.readInt();
    }

    public static final Parcelable.Creator<CountryInfo> CREATOR = new Parcelable.Creator<CountryInfo>() {
        @Override
        public CountryInfo createFromParcel(Parcel source) {
            return new CountryInfo(source);
        }

        @Override
        public CountryInfo[] newArray(int size) {
            return new CountryInfo[size];
        }
    };
}
